package com.ai.bitcoin.jpa.dao;

import com.ai.bitcoin.jpa.entity.BccPriceInfoCrawl;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

/**
 * @author Jason
 * @date 2018/4/6
 **/
public interface BccPriceInfoCrawlDao extends JpaRepository<BccPriceInfoCrawl, String> {
    BccPriceInfoCrawl save(BccPriceInfoCrawl bccPriceInfo);

    Page<BccPriceInfoCrawl> findByBatchNo(String batchNo, Pageable pageable);

    List<BccPriceInfoCrawl> findByBccIdAndBatchNo(String bccId, String batchNo);

    void deleteByBatchNo(String batchNo);

    void deleteByCreateTimeLessThan(Date date);

}
